home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
CAD
/
PCONFRE2.ARJ
/
ARCTEXT.LSP
< prev
next >
Wrap
Lisp/Scheme
|
1988-08-16
|
3KB
|
99 lines
(defun C:ARCTEXT ()
(if ho (progn
(setq h (getreal (strcat "Give Character Height <" (rtos ho) "> : ")))
(if (= h nil) (setq h ho)))
(setq h (getreal "Give Character Height: ")))
(setq ho h)
(if p0o (progn
(setq p0 (getpoint (strcat "\nGive Arc/Circle Center Point: <"
(rtos (car p0o) 2 2) "," (rtos (cadr p0o) 2 2) "> : ")))
(if (= p0 nil) (setq p0 p0o)))
(setq p0 (getpoint "\nGive Arc/Circle Center Point: ")))
(setq p0o p0)
(if p1o (progn
(setq p1 (getpoint (strcat "\nGive Text Center Bottom Point: <"
(rtos (car p1o) 2 2) "," (rtos (cadr p1o) 2 2) "> : ")))
(if (= p1 nil) (setq p1 p1o)))
(setq p1 (getpoint "\nGive Text Center Bottom Point: ")))
(setq p1o p1)
(if dno (progn
(setq dn (getstring (strcat "\nClockwise or Anticlockwise <" dno "> : ")))
(if (= dn "" ) (setq dn dno)))
(setq dn (getstring "\nClockwise or Anticlockwise <C> : ")))
(if (= dn "" ) (setq dn "C"))
(setq dno dn)
(if w1o (progn
(setq w1 (getreal (strcat "\nWidth Factor <" (rtos w1o 2 2) "> : ")))
(if (= w1 nil) (setq w1 w1o)))
(setq w1 (getreal "\nWidth Factor <1> : ")))
(if (= w1 nil) (setq w1 1.0))
(setq w1o w1)
(if s1o (progn
(setq s1 (getreal (strcat "\nSpacing Adjustment <" (rtos s1o 2 2) "> : ")))
(if (= s1 nil) (setq s1 s1o)))
(setq s1 (getreal "\nSpacing Adjustment <0> : ")))
(if (= s1 nil) (setq s1 0))
(setq s1o s1)
(setq tex "\nKey Text: ")
(if texo (progn
(setq tex (strcat tex "<" texo "> : "))
(setq tex (getstring tex "n\Key Tex : "))
(if (= tex "") (setq tex texo)))
(setq tex (getstring tex "Key Text: ")))
(setq texo tex)
(setvar "cmdecho" 0)
(setvar "highlight" 0)
(setvar "blipmode" 0)
(setq l (strlen tex))
(setq n 1)
(setq wfo 0)
(setq ang (angle p0 p1))
(setq r (distance p0 p1))
(setq wid (list 0 100 40 80 86 108 115 98 40 60 60 83 83 40 83 40 83 102 65 92
96 96 98 98 86 95 98 40 40 60 83 60 89 140 118 105 113 110 96 96 115 104 40 90
110 94 126 110 120 98 120 99 108 98 108 118 156 120 110 98 60 80 60 77 121 40 85
92 89 92 92 57 92 87 34 45 87 34 133 87 92 92 92 51 81 57 87 89 128 95 90 77 ))
(setq wt 0)
(while (<= n l)
(setq tx (substr tex n 1))
(setq wf1 (/ (nth (- (ascii tx) 31) wid) 100.0))
(setq w (* (+ wf1 s1) w1 h))
(setq wt (+ wt w))
(setq n (1+ n))
)
(setq wt (- wt (* w1 h 0.2) s1))
(setq n 1)
(if (= (strcase dn) "A") (progn
(setq ang (- ang (/ (/ wt r) 2)))
(setq p1 (polar p0 ang r))
)
(progn
(setq ang (+ ang (/ (/ wt r) 2)))
(setq p1 (polar p0 ang r))
))
(while (<= n l)
(setq tx (substr tex n 1))
(setq wf1 (/ (nth (- (ascii tx) 31) wid) 100.0))
(setq w3 (* (/ (- wf1 0.2) 2.0) w1 h))
(setq wf (/ (+ wf1 wfo) 2.0))
(setq w (* (+ wf s1) w1 h))
(if (= (strcase dn) "A") (progn
(if (= n 1) (setq ang1 (+ ang (/ w3 r))) (setq ang1 (+ ang (/ w r))))
(setq rot (+ (* ang1 (/ 180 pi)) 90))
(setq p2 (polar p0 (- ang1 (/ w3 r)) r)))
(progn
(if (= n 1) (setq ang1 (- ang (/ w3 r))) (setq ang1 (- ang (/ w r))))
(setq rot (- (* ang1 (/ 180 pi)) 90))
(setq p2 (polar p0 (+ ang1 (/ w3 r)) r)))
)
(command "text" p2 h rot tx)
(setq n (1+ n))
(setq ang ang1)
(setq wfo wf1)
)
(setvar "highlight" 1)
(setvar "blipmode" 1)
(setvar "cmdecho" 1)
(princ)
)